﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using TAXILISM.Class;

namespace TAXILISM
{
    public partial class setting : PhoneApplicationPage
    {

        public setting()
        {
            InitializeComponent();

            la.getAllow();
            if (la.status == "true")
            {
                allowSw.IsChecked = true;
            }
            else
            {
                allowSw.IsChecked = false;
            }
        }
        LocationAllow la = new LocationAllow();
        private void allowSw_Checked(object sender, System.Windows.RoutedEventArgs e)
        {
        	// TODO: Add event handler implementation here.
            la.putAllow("true");
			chkTxt.Text="Allowed";
        }

        private void allowSw_Unchecked(object sender, System.Windows.RoutedEventArgs e)
        {
        	// TODO: Add event handler implementation here.
            la.putAllow("false");
			chkTxt.Text="Not Allow";
        }
    }
}
